package com.iob.coin.controller;

import com.iob.coin.bl.kgqa.KgQAService;
import com.iob.coin.vo.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.websocket.server.PathParam;

/**
 * @Author: GuoXinyuan
 * @Date: 2021/6/10
 */
@RestController
@CrossOrigin
@RequestMapping("/test")
public class TestController {

    @Autowired
    KgQAService kgQAService;

    @PostMapping("/ask")
    public ResponseVO test(@PathParam("question") String question){
        return kgQAService.ask(question);
    }

}
